function easeInOutCubic(t) {
    return t < 0.5
        ? 4 * t * t * t
        : 1 - Math.pow(-2 * t + 2, 3) / 2;
}

// 生成一系列数据点
function generateEaseInOutData(steps = 100, max = 100) {
    const dataPoints = [];
    for (let i = 0; i <= steps; i++) {
        const t = i / steps; // 计算当前的时间进度
        const value = easeInOutCubic(t); // 应用 easing 函数
        dataPoints.push({ time: t, value: Number(value) * max });
    }
    return dataPoints;
}

// 示例：生成10个数据点
const easeInOutData = generateEaseInOutData(10);
console.log(easeInOutData);


